//
//  UILabel+Extension.swift
//  Sina
//
//  Created by  duan on 16/4/7.
//  Copyright © 2016年 duan. All rights reserved.
//

import UIKit

//创建一个label的扩展:
extension UILabel{
    
    //定义一个遍历构造函数,用于方便设置label
    convenience init( title: String, fontSize: CGFloat, color: UIColor){
    
    self.init()
        text = title
        textColor = color
        font = UIFont.systemFontOfSize(fontSize)
        textAlignment = NSTextAlignment.Center
        numberOfLines = 0
    
    }
    
    
    
}
